package com.jzo2o.market.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jzo2o.market.model.domain.Activity;
import com.jzo2o.market.model.dto.response.ActivityInfoResDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author itcast
 * @since 2023-09-16
 */
public interface ActivityMapper extends BaseMapper<Activity> {

    /**
     * 分页查询优惠券活动
     *
     * @param id
     * @param name
     * @param status
     * @param type
     * @return
     */
    List<ActivityInfoResDTO> selectByPage(@Param("id") Long id,
                                          @Param("name") String name,
                                          @Param("status") Integer status,
                                          @Param("type") Integer type);

    /**
     * 根据id查询优惠券活动详情
     *
     * @param id
     * @return
     */
    ActivityInfoResDTO findById(Long id);
}
